<?php
/**
 * Created by PhpStorm.
 * User: AivyYuan
 * Date: 2016/7/8
 * Time: 10:34
 */
namespace app\models;

use Yii;
use yii\base\Model;

class CategoryForm extends Model{

    public $name;
    public $pid;
    public $status;
    public $desc;

    public function rules()
    {
        return [
            // name, email, subject and body are required
            [['name',  'status'], 'required',],
            [['pid','desc'],'safe'],
            //['name','unique',['Category'=>'name']],
            // email has to be a valid email address
            // verifyCode needs to be entered correctly
        ];
    }
}